home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
comm1
/
s2mtr376.lha
/
SANA2Meter
/
Source
/
smakefile
< prev
next >
Wrap
Makefile
|
1996-04-26
|
7KB
|
242 lines
#!sc:c/smake
#
#####################################################################
#
# SMakefile for SANA2Meter
#
# (C) Copyright 1996 Marius Gröger
# All Rights Reserved
#
#####################################################################
#####################################################################
#
# installation drawer and names
#
INSTALL_DIR = AMITCP:SANA2Meter
BIN_DIR = /bin
LOCALE_DIR = /Catalogs
NAME = SANA2Meter
BASENAME = SANA2Meter
RELNAME = s2meter
IDS = aminet.ids
VERSION = 37
#
#####################################################################
#####################################################################
#
# following stuff is your configuration
#
LIBS = LIB lib:pools.lib LIB LIB:amiga.lib LIB lib:debug.lib \
LIB lib:sc.lib
CINCLUDES = INCDIR "DOCS:pd" INCDIR "DOCS:poolsinclude"
ASMINCLUDES = INCDIR="INCLUDEA:"
CPUSUFFIX = 020 # 000 010 020 030 040 ANY
CPUCCOPT = CPU=68$(CPUSUFFIX)
CP = C:Copy
MV = C:Rename
RM = C:Delete >NIL:
LD = sc:c/slink
CC = sc:c/sc
AS = sc:c/sc
STRIP = sc:c/slink
MAKE = sc:c/smake
BUMPREV = C:BumpRev
SETREV = C:SetRev
CATCOMP = C:CatComp
PROTECT = protect
BUILD_AMINET= /s/build-aminet
ECHO = Echo
#
#####################################################################
#####################################################################
#
# assembler/compiler flags
#
# this applies to normal and optimized compilation:
#
STDFLAGS = $(CINCLUDES) NOMULTIPLEINCLUDES ERRREXX COMMENTNEST NOSTKCHK NOCHKABORT\
SMALLCODE SMALLDATA VERBOSE NOICONS NOSTRICT NOANSI DEBUG=SYMBOLFLUSH
#
# this applies only to normal compilation:
#
NORMCFLAGS = $(STDFLAGS) GST $(NAME).gst
#
# this applies only to optimized compilation:
#
OPTCFLAGS = $(STDFLAGS) $(CPUCCOPT) PARAMETERS=REGISTERS OPT OPTTIME OPTINLINE\
OPTSCHEDULE STRINGMERGE STRUCTUREEQUIVALENCE GST $(NAME).gst
#
# this applies to assembler compilation
#
AFLAGS = $(ASMINCLUDES) VERBOSE SMALLCODE SMALLDATA
#
#####################################################################
#####################################################################
#
# linkage flags
#
LDFLAGS = NOICONS SC SD $(LIBS) TO
OPTLDFLAGS = NOICONS SC SD ND $(LIBS) TO
STRIPFLAGS = NOICONS ND TO
#
#####################################################################
#####################################################################
#
# the object files
#
# use commented lines instead to compile w/out ExtReadArgs() package.
#NORMOBJ = LIB:RXstartup.obj $(NAME).no gui.no support.no \
# locale.no constdata.no
#OPTOBJ = LIB:RXstartup.obj $(NAME).opt$(CPUSUFFIX) \
# gui.opt$(CPUSUFFIX) support.opt$(CPUSUFFIX) \
# locale.no constdata.no
NORMOBJ = LIB:RXstartup.obj $(NAME).no gui.no support.no \
LIB:extrdargs.o locale.no constdata.no
OPTOBJ = LIB:RXstartup.obj $(NAME).opt$(CPUSUFFIX) \
gui.opt$(CPUSUFFIX) support.opt$(CPUSUFFIX) \
LIB:extrdargs.o locale.no constdata.no
#
#####################################################################
#####################################################################
#
# rules
#
# compile a file normally
#
.c.no:
$(CC) $(NORMCFLAGS) $*.c
-@$(RM) $*.no
@$(MV) $*.o $*.no
#
# compile a file optimizing
#
.c.opt$(CPUSUFFIX):
$(CC) $(OPTCFLAGS) $*.c
-@$(RM) $*.opt$(CPUSUFFIX)
@$(MV) $*.o $*.opt$(CPUSUFFIX)
#
# assemble a file
#
.asm.o:
$(AS) $(AFLAGS) $*.asm
#
#####################################################################
#####################################################################
#
# targets
#
help:
-@$(ECHO) "Usage:"
-@$(ECHO) "To make an unoptimized version"
-@$(ECHO) " $(MAKE) all"
-@$(ECHO) "To make an optimized version"
-@$(ECHO) " $(MAKE) all_opt"
-@$(ECHO) "To install an unoptimized version"
-@$(ECHO) " $(MAKE) install"
-@$(ECHO) "To install an optimized version"
-@$(ECHO) " $(MAKE) install"
-@$(ECHO) "To increment the releases's revision"
-@$(ECHO) " $(MAKE) newrelrev"
-@$(ECHO) "To remove all intermediate files for unoptimized the version"
-@$(ECHO) " $(MAKE) clean_norm"
-@$(ECHO) "To remove all intermediate files for optimized the version"
-@$(ECHO) " $(MAKE) clean_opt"
-@$(ECHO) "To remove all intermediate files"
-@$(ECHO) " $(MAKE) clean"
install: all
$(CP) $(BIN_DIR)/$(NAME) $(INSTALL_DIR)/$(NAME)
install_opt: all_opt
$(CP) $(BIN_DIR)/$(NAME).$(CPUSUFFIX) $(INSTALL_DIR)/$(NAME)
all: $(NAME).gst $(BIN_DIR)/$(NAME) locale
all_opt: $(NAME).gst $(BIN_DIR)/$(NAME).$(CPUSUFFIX) locale
$(NAME).gst: $(NAME).preinc
$(CC) NOOBJNAME MGST $@ $(STDFLAGS) $(NAME).preinc
newrelrev:
$(BUMPREV) $(VERSION) $(BASENAME)
$(RM) $(BASENAME)_rev.i
newrev:
$(BUMPREV) $(VERSION) $(NAME)_rev
clean_norm:
-@$(RM) *.ld
-@$(RM) *.gst
-@$(RM) *.o
-@$(RM) *.no
clean_opt:
-@$(RM) *.ld
-@$(RM) *.gst
-@$(RM) *.o
-@$(RM) *.opt*
clean: clean_norm clean_opt
release:
$(MAKE) CPUSUFFIX=000 all_opt
$(MAKE) CPUSUFFIX=020 all_opt
$(MAKE) CPUSUFFIX=040 all_opt
$(BUILD_AMINET) "$(RELNAME)" "$(BASENAME)" "$(BIN_DIR)/$(NAME).$(CPUSUFFIX)" "/ReadMe" "//$(NAME)" "$(IDS)" CLEAN
$(BIN_DIR)/$(NAME).$(CPUSUFFIX): $(OPTOBJ)
$(LD) $(OPTOBJ) $(OPTLDFLAGS) $@
$(PROTECT) $@ +p
$(BIN_DIR)/$(NAME): $(NORMOBJ)
$(LD) $(NORMOBJ) $(LDFLAGS) $@.ld
$(STRIP) $@.ld $(STRIPFLAGS) $@
$(PROTECT) $@ +p
#
#####################################################################
#####################################################################
#
# Localisation stuff
#
locale: blank.ct $(LOCALE_DIR)/deutsch/$(NAME).catalog
locale.no: locale.c locale.h
$(CC) IGNORE 84 $(NORMCFLAGS) $*.c
-@$(RM) $*.no
@$(MV) $*.o $*.no
blank.ct: locale.cd
$(CATCOMP) DESCRIPTOR locale.cd CTFILE $@
locale.h: locale.cd
$(CATCOMP) DESCRIPTOR locale.cd CFILE locale.h
$(LOCALE_DIR)/deutsch/$(NAME).catalog: deutsch.ct
$(CATCOMP) DESCRIPTOR locale.cd deutsch.ct CATALOG $@
#
#####################################################################
#####################################################################
#
# various dependencies
#
constdata.no: constdata.c sana2meter.h SANA2Meter_rev.h
support.no: support.c sana2meter.h constdata.h
support.opt$(CPUSUFFIX): support.c sana2meter.h constdata.h
gui.no: gui.c sana2meter.h constdata.h
gui.opt$(CPUSUFFIX): gui.c sana2meter.h constdata.h
$(NAME).no: $(NAME).c locale.h sana2meter.h constdata.h
$(NAME).opt$(CPUSUFFIX): $(NAME).c locale.h sana2meter.h constdata.h
#
#####################################################################